{literal}
<script type="text/javascript" language="javascript">

$(document).ready(function(){
$('#vnm').focus(function(){ if( $(this).val()== 'Keyword' ) $(this).val('');});
$('#vnm').blur(function(){ if( $(this).val()== '' ) $(this).val('Keyword');});


/* right panel filter more/less links */
	var filterThreshold = 5;
	$('.listing').each(function(i){
	if($(this).find('a.selected').length == 0){
		$(this).find('li:gt('+(filterThreshold-1)+')').hide();
		if($(this).find('li').length > filterThreshold)
			$(this).after('<li class="more"><a href="#"><em><span>+ more</span></em></a></li><li style="clear:both; width:100%"></li>');
		else
			$(this).after('');
	}
	});

	$('.more').each(function(i){
		$(this).toggle(function(){
		$(this).prev().find('li:gt('+(filterThreshold-1)+')').slideDown('fast');
		$(this).html('<li class="more"><a href="#"><em><span>- less</span></em></a></li><li style="clear:both; width:100%"></li>');
		},function(){
		$(this).prev().find('li:gt('+(filterThreshold-1)+')').slideUp('fast');
		$(this).html('<li class="more"><a href="#"><em><span>+ more</span></em></a></li><li style="clear:both; width:100%"></li>');
		});
	});
	$('.refine').click(function(){
	
		var val = $(this).attr('typeId');
		var type = $(this).attr('stype');
		
		if(type =='L')
		{
			
			if($('#ladder_'+val).attr('checked'))
			$('#ladder_'+val).attr('checked','');
			else
			$('#ladder_'+val).attr('checked','true');
		}
		else if(type =='CH')
		{
			if($('#champion_'+val).attr('checked'))
			$('#champion_'+val).attr('checked','');
			else
			$('#champion_'+val).attr('checked','true');
		}	
		else if(type =='CL')
		{
			if($('#class_'+val).attr('checked'))
			$('#class_'+val).attr('checked','');
			else
			$('#class_'+val).attr('checked','true');
		}	
		else if(type =='MP')
		{
			if($('#map_'+val).attr('checked'))
			$('#map_'+val).attr('checked','');
			else
			$('#map_'+val).attr('checked','true');
		}	
		else if(type =='MD')
		{
			if($('#mode_'+val).attr('checked'))
			$('#mode_'+val).attr('checked','');
			else
			$('#mode_'+val).attr('checked','true');
		}	
		else if(type =='TM')
		{
			if($('#team_'+val).attr('checked'))
			$('#team_'+val).attr('checked','');
			else
			$('#team_'+val).attr('checked','true');
		}	
		else if(type =='TP')
		{
			if($('#type_'+val).attr('checked'))
			$('#type_'+val).attr('checked','');
			else
			$('#type_'+val).attr('checked','true');
		}	
		else if(type =='V')
		{
			if($('#versus_'+val).attr('checked'))
			$('#versus_'+val).attr('checked','');
			else
			$('#versus_'+val).attr('checked','true');
		}	
		else if(type =='R')
		{
			if($('#race_'+val).attr('checked'))
			$('#race_'+val).attr('checked','');
			else
			$('#race_'+val).attr('checked','true');
		}	
		else if(type =='S')
		{
			if($('#server_'+val).attr('checked'))
			$('#server_'+val).attr('checked','');
			else
			$('#server_'+val).attr('checked','true');
		}
		else if(type =='X')
		{
			if($('#region_'+val).attr('checked'))
			$('#region_'+val).attr('checked','');
			else
			$('#region_'+val).attr('checked','true');
		}
		else if(type =='Y')
		{
			if($('#rating_'+val).attr('checked'))
			$('#rating_'+val).attr('checked','');
			else
			$('#rating_'+val).attr('checked','true');
		}		
		else if(type =='A')
		{
			if($('#avail_'+val).attr('checked'))
			$('#avail_'+val).attr('checked','');
			else
			$('#avail_'+val).attr('checked','true');
		}
		else
		{
			if($('#language_'+val).attr('checked'))
			$('#language_'+val).attr('checked','');
			else
			$('#language_'+val).attr('checked','true');
		}
		
		//document.frmRefine.submit();
		frmRefine_POST();
	});
  });	
</script>
<link rel="stylesheet" href="slider/stylesheets/jslider.css" type="text/css">
<link rel="stylesheet" href="slider/stylesheets/jslider.plastic.css" type="text/css">
<script type="text/javascript" src="slider/javascripts/jquery-1.4.2.js"></script>
<script type="text/javascript" src="slider/javascripts/jquery.dependClass.js"></script>
<script type="text/javascript" src="slider/javascripts/jquery.slider-min.js"></script>
<script type='text/javascript'>
function frmRefine_POST()
{
  var data = $(document.frmRefine).serialize();
  $('#loading').html('<p><img src="images/bar-loader.gif" alt="Loading..." /></p>');
  //alert(data);
  $.ajax({
	type: "GET",
	url: 'replays2.php',
	data: data,			
	dataType: 'html',
	success: function(data)
	{				
	   
	   $('.container-inner').html(data + "<div class='clear'></div>");
	   //alert(data);
	   $('#loading').html();
	}
});
}
 
function subForm(a){
//alert(a);
	document.getElementById('listfor').value='sorting';
	document.getElementById('sortingby').value=a;
	goto();
}
function searchVdo()
{
   var vnm = $('#vnm').val();
   if(vnm == '' || vnm =='Keyword')
    $('#vnm').css('border','1px solid red');
   else
   {
     document.getElementById('vtitle').value=vnm;
	 goto();
   }	 	
}
function resetSearch()
{
     document.getElementById('vtitle').value='';
	 goto();
   	 	
}
function goto(){
	frmRefine_POST();
}
</script>
{/literal}
{if $FromPage eq 'videodetails'}
<div class="container-inner">
{/if}
<div class="left-panel">
<div class="left-search">
       <form action="replays.php" method="post" name="frmRefine">
       <fieldset>
       <select name="game_id" id="game_id">
	  {html_options options=$GameArr selected=$game_id}
	</select>
       <input name="" value="Go" class="go" type="submit" />
	  <div style="background:#ccc; width:250px; float:left; display:block; top:40px; left:0px; height:37px; border:1px solid #ededed; padding:3px 0 0 5px; position:absolute;">
	   <input name="vnm" class="text" type="text" id="vnm" {if $vdotitle neq ''}value="{$vdotitle}"{else}value="Keyword"{/if} />
	     <input type="button" value="" onclick="searchVdo()" /></div>
       </fieldset>
       </form>
 </div>
   <div class="graphite demo-container">
	<ul class="accordion" id="accordion-1">
	<form action="replays.php" method="post" name="frmRefine">
	<input type="hidden" name="vtitle" id="vtitle" value="{$vdotitle}"/>

	<input type="hidden" name="list_for" id="listfor" value="" />
	   <input type="hidden" name="sorting_by" id="sortingby" value=""/>
	<input type="hidden" name="action" value="send" />
	{if $is_ladder eq 'Y'}
	 {if $Numladder neq '0'}
	    <li><a href="#">Ladder</a>
		<ul>	
		 <div class="listing">
		 {section name=ladder loop=$LadderArr}
			<li>
			<input type="checkbox" name="ladder_id[]" id='ladder_{$LadderArr[ladder].ladder_id}' value="{$LadderArr[ladder].ladder_id}" style="display:none;"
			{if $ladder_id|@sizeof neq 0 and $LadderArr[ladder].ladder_id|in_array:$ladder_id} checked="checked" {/if}/>
			<a href="#" class="refine {if $ladder_id|@sizeof neq 0 and $LadderArr[ladder].ladder_id|in_array:$ladder_id} selected {/if}" stype="L" typeId="{$LadderArr[ladder].ladder_id}"> 
			{$LadderArr[ladder].ladder_name} ({$LadderArr[ladder].countrow}) </a>
			</li>
                 {/section}
				 
		 </div>		 
		 </ul>
	   </li>	 
	 {/if}	
	{/if} 
	{if $is_race eq 'Y'}
	 {if $Numrace neq '0'}
	    <li><a href="#">Race</a>
		<ul>	
		 <div class="listing">
			 {section name=race loop=$RaceArr}
				   	<li>
					<input type="checkbox" name="race_id[]" id='race_{$RaceArr[race].race_id}' value="{$RaceArr[race].race_id}" style="display:none" 
					{if $race_id|@sizeof neq '' and  $RaceArr[race].race_id|in_array:$race_id} checked="checked" {/if}/>
					<a href="#" class="refine {if $race_id|@sizeof neq '' and $RaceArr[race].race_id|in_array:$race_id} selected {/if}" stype="R" typeId="{$RaceArr[race].race_id}"> 
					{$RaceArr[race].race_title} ({$RaceArr[race].countrow}) </a> </li>
			{/section}
				 
		 </div>		 
	      </ul>
	   </li>	 
	 {/if}	
	{/if}
	<!-- Chandan Added this Starts-->
	{if $is_champion eq 'Y'}
	 {if $NumChampion neq '0'}
	    <li><a href="#">Champion</a>
		<ul>	
		 <div class="listing">
				 {section name=champion loop=$ChampionArr}
				   	<li>
					<input type="checkbox" name="champion_id[]" id='champion_{$ChampionArr[champion].champion_id}' value="{$ChampionArr[champion].champion_id}" style="display:none" 
					{if $champion_id|@sizeof neq '' and $ChampionArr[champion].champion_id|in_array:$champion_id} checked="checked" {/if}/>
					<a href="#" class="refine {if $champion_id|@sizeof neq '' and $ChampionArr[champion].champion_id|in_array:$champion_id} selected {/if}" stype="CH" typeId="{$ChampionArr[champion].champion_id}"> 
					{$ChampionArr[champion].champion_title} ({$ChampionArr[champion].countrow}) </a> </li>
                 {/section}
				 
		 </div>		 
	      </ul>
	   </li>	 
	 {/if}	
	{/if}
        <!-- Chandan Added This Ends-->
	
	<!-- Chandan Added this Starts-->
	{if $is_class eq 'Y'}
	 {if $NumClass neq '0'}
	    <li><a href="#">Class</a>
		<ul>	
		 <div class="listing">
				 {section name=class loop=$ClassArr}
				   	<li>
					<input type="checkbox" name="class_id[]" id='class_{$ClassArr[class].class_id}' value="{$ClassArr[class].class_id}" style="display:none" 
					{if $class_id|@sizeof neq '' and $ClassArr[class].class_id|in_array:$class_id} checked="checked" {/if}/>
					<a href="#" class="refine {if $class_id|@sizeof neq '' and $ClassArr[class].class_id|in_array:$class_id} selected {/if}" stype="CL" typeId="{$ClassArr[class].class_id}"> 
					{$ClassArr[class].class_title} ({$ClassArr[class].countrow}) </a> </li>
                 {/section}
				 
		 </div>		 
	      </ul>
	   </li>	 
	 {/if}	
	{/if}
        <!-- Chandan Added This Ends-->
	<!-- Chandan Added this Starts-->
	{if $is_map eq 'Y'}
	 {if $NumMap neq '0'}
	    <li><a href="#">Map</a>
		<ul>	
		 <div class="listing">
				 {section name=map loop=$MapArr}
				   	<li>
					<input type="checkbox" name="map_id[]" id='map_{$MapArr[map].map_id}' value="{$MapArr[map].map_id}" style="display:none" 
					{if $map_id|@sizeof neq '' and $MapArr[map].map_id|in_array:$map_id} checked="checked" {/if}/>
					<a href="#" class="refine {if $map_id|@sizeof neq '' and $MapArr[map].map_id|in_array:$map_id} selected {/if}" stype="MP" typeId="{$MapArr[map].map_id}"> 
					{$MapArr[map].map_title} ({$MapArr[map].countrow}) </a> </li>
                 {/section}
				 
		 </div>		 
	      </ul>
	   </li>	 
	 {/if}	
	{/if}
        <!-- Chandan Added This Ends-->
	<!-- Chandan Added this Starts-->
	{if $is_mode eq 'Y'}
	 {if $NumMode neq '0'}
	    <li><a href="#">Mode</a>
		<ul>	
		 <div class="listing">
				 {section name=mode loop=$ModeArr}
				   	<li>
					<input type="checkbox" name="mode_id[]" id='mode_{$ModeArr[mode].mode_id}' value="{$ModeArr[mode].mode_id}" style="display:none" 
					{if $mode_id|@sizeof neq '' and $ModeArr[mode].mode_id|in_array:$mode_id} checked="checked" {/if}/>
					<a href="#" class="refine {if $mode_id|@sizeof neq '' and $ModeArr[mode].mode_id|in_array:$mode_id} selected {/if}" stype="MD" typeId="{$ModeArr[mode].mode_id}"> 
					{$ModeArr[mode].mode_title} ({$ModeArr[mode].countrow}) </a> </li>
				{/section}
				 
		 </div>		 
	      </ul>
	   </li>	 
	 {/if}	
	{/if}
        <!-- Chandan Added This Ends-->
	<!-- Chandan Added this Starts-->
	{if $is_team eq 'Y'}
	 {if $NumTeam neq '0'}
	    <li><a href="#">Team</a>
		<ul>	
		 <div class="listing">
				 {section name=team loop=$TeamArr}
				   	<li>
					<input type="checkbox" name="team_id[]" id='team_{$TeamArr[team].team_id}' value="{$TeamArr[team].team_id}" style="display:none" 
					{if $team_id|@sizeof neq '' and $TeamArr[team].team_id|in_array:$team_id} checked="checked" {/if}/>
					<a href="#" class="refine {if $team_id|@sizeof neq '' and $TeamArr[team].team_id|in_array:$team_id} selected {/if}" stype="TM" typeId="{$TeamArr[team].team_id}"> 
					{$TeamArr[team].team_title} ({$TeamArr[team].countrow}) </a> </li>
				 {/section}
				 
		 </div>		 
	      </ul>
	   </li>	 
	 {/if}	
	{/if}
        <!-- Chandan Added This Ends-->
	<!-- Chandan Added this Starts-->
	{if $is_type eq 'Y'}
	 {if $NumType neq '0'}
	    <li><a href="#">Type</a>
		<ul>	
		 <div class="listing">
				 {section name=type loop=$TypeArr}
				   	<li>
					<input type="checkbox" name="type_id[]" id='type_{$TypeArr[type].type_id}' value="{$TypeArr[type].type_id}" style="display:none" 
					{if $type_id|@sizeof neq '' and $TypeArr[type].type_id|in_array:$type_id} checked="checked" {/if}/>
					<a href="#" class="refine {if $type_id|@sizeof neq '' and $TypeArr[type].type_id|in_array:$type_id} selected {/if}" stype="TP" 
					typeId="{$TypeArr[type].type_id}" title="{$TypeArr[type].type_full_title}"> 
					{$TypeArr[type].type_title} ({$TypeArr[type].countrow}) </a> </li>
				 {/section}
				 
		 </div>		 
	      </ul>
	   </li>	 
	 {/if}	
	{/if}
        <!-- Chandan Added This Ends-->
	<!-- Chandan Added this Starts-->
	{if $is_versus eq 'Y'}
	 {if $NumVersus neq '0'}
	    <li><a href="#">Versus</a>
		<ul>	
		 <div class="listing">
				 {section name=versus loop=$VersusArr}
				   	<li>
					<input type="checkbox" name="versus_id[]" id='versus_{$VersusArr[versus].versus_id}' value="{$VersusArr[versus].versus_id}" style="display:none" 
					{if $versus_id|@sizeof neq '' and $VersusArr[versus].versus_id|in_array:$versus_id} checked="checked" {/if}/>
					<a href="#" class="refine {if $versus_id|@sizeof neq '' and $VersusArr[versus].versus_id|in_array:$versus_id} selected {/if}" stype="V" typeId="{$VersusArr[versus].versus_id}"> 
					{$VersusArr[versus].versus_title} ({$VersusArr[versus].countrow}) </a> </li>
				 {/section}
				 
		 </div>		 
	      </ul>
	   </li>	 
	 {/if}	
	{/if}
	<li><a href="#">Duration (min)</a> 
           <ul>	
				  <li style="height:30px; padding:15px 5px 5px 5px;"> 
				   <span style="display: inline-block; width: 230px; padding: 0 5px;">
				   <input id="Slider2" type="slider" name="duration" value="{$duration}"/></span> 
                    {literal}
					 <script type="text/javascript" charset="utf-8">
					  jQuery("#Slider2").slider({ from: 0, to: 60, limits: false, step: 1,smooth: true, round: 0, dimension: '', skin: "plastic", callback: 
					  function( value ){ /* document.frmRefine.submit() */ frmRefine_POST(); } });
					</script>
					{/literal}
				 </li>	
		   </ul>
	</li>
        <!-- Chandan Added This Ends-->

	<!-- {if $is_server eq 'Y'}
	 {if $Numserver neq '0'}
	    <li><a href="#">Server</a>
        <ul>	
		 <div class="listing">
				 {section name=server loop=$serverArr}
				   	<li>
					<input type="checkbox" name="server_id[]" id='server_{$serverArr[server].server_id}' value="{$serverArr[server].server_id}" style="display:none" 
					{if $serverArr[server].server_id|in_array:$server_id} checked="checked" {/if}/>
					<a href="#" class="refine {if $serverArr[server].server_id|in_array:$server_id} selected {/if}" stype="S" typeId="{$serverArr[server].server_id}"> 
					{$serverArr[server].server_name} ({$serverArr[server].countrow}) </a> </li>
                 {/section}
				 
		 </div>		 
		 </ul>
	   </li>	 
	 {/if}	
	{/if} 
	{if $is_region eq 'Y'}
	 {if $Numregion neq '0'}
	    <li><a href="#">Region</a>
        <ul>	
		 <div class="listing">
				 {section name=region loop=$regionArr}
				   	<li>
					<input type="checkbox" name="region_id[]" id='region_{$regionArr[region].region_id}' value="{$regionArr[region].region_id}" style="display:none;"
					{if $regionArr[region].region_id|in_array:$region_id} checked="checked" {/if}/>
					<a href="#" class="refine {if $regionArr[region].region_id|in_array:$region_id} selected {/if}" stype="X" typeId="{$regionArr[region].region_id}"> 
					{$regionArr[region].region_title} ({$regionArr[region].countrow}) </a> </li>
                 {/section}
				 
		 </div>		 
		 </ul>
	   </li>	 
	 {/if}	
	{/if} 
	{if $is_rating eq 'Y'}
	 {if $Numrating neq '0'}
	    <li><a href="#">Rating</a>
        <ul>	
		 <div class="listing">
				 {section name=rating loop=$ratingArr}
				   	<li>
					<input type="checkbox" name="rating_id[]" id='rating_{$ratingArr[rating].rating_id}' value="{$ratingArr[rating].rating_id}" style="display:none" 
					{if $ratingArr[rating].rating_id|in_array:$rating_id} checked="checked" {/if}/>
					<a href="#" class="refine {if $ratingArr[rating].rating_id|in_array:$rating_id} selected {/if}" stype="Y" typeId="{$ratingArr[rating].rating_id}"> 
					{$ratingArr[rating].rating_title} ({$ratingArr[rating].countrow}) </a> </li>
                 {/section}
				 
		 </div>		 
		 </ul>
	   </li>	 
	 {/if}	
	{/if} 
	<li><a href="#">Rate ($)</a> 
           <ul>	
		  <li style="height:30px; padding:15px 5px 5px 5px;"> 
		   <span style="display: inline-block; width: 230px; padding: 0 5px;">
		   <input id="Slider1" type="slider" name="price" value="{$price}"/></span> 
			{literal}
			 <script type="text/javascript" charset="utf-8">
			  jQuery("#Slider1").slider({ from: 0, to: 100, limits: false, step: 1, dimension: '', skin: "plastic", callback: 
			  function( value ){ /* document.frmRefine.submit() */ frmRefine_POST(); } });
			</script>
			{/literal}
		 </li>	
	  </ul>
	</li>  
	{if $Numlanguage neq '0'}	
	     <li><a href="#">Language</a>
            <ul>
			 <div class="listing">
                   
				  {section name=lang loop=$languageArr}
				  	<li>
					<input type="checkbox" name="language_id[]" id="language_{$languageArr[lang].language_id}" value="{$languageArr[lang].language_id}" style="display:none;" 
					{if $languageArr[lang].language_id|in_array:$language_id} checked="checked" {/if}/>				
					<a class="refine {if $languageArr[lang].language_id|in_array:$language_id} selected {/if}" stype="Z" typeId="{$languageArr[lang].language_id}" >
					{$languageArr[lang].language_name} ({$languageArr[lang].cnt})</a></a></li>
                  {/section}
			  </div> 
			</ul>
		</li>	
	  {/if}	
	<li><a href="#">Availability</a>
           <ul>
		   <div class="listing">
			 
			  <li> <input type="checkbox" name="availability[]" id="avail_O" value="O" style="display:none" {if 'O'|in_array:$availability} checked="checked" {/if} />
			  <a href="#" class="refine {if 'O'|in_array:$availability} selected {/if}" stype="A" typeId="O"> Online({$avail1Num})</a></li>
			  <li> <input type="checkbox" name="availability[]" id="avail_L" value="L" style="display:none" {if 'L'|in_array:$availability} checked="checked" {/if} />
			  <a href="#" class="refine {if 'L'|in_array:$availability} selected {/if}" stype="A" typeId="L" > Local meet-up({$avail2Num})</a></li>
		   </div>  
	   </ul>
	</li> -->   
	   
	  <input type="hidden" name="record_per_page" id="record_per_page" value="{$record_per_page}" style="visibility:hidden">

	  <input type="submit" style="visibility:hidden">
	 </form> 	
    </ul>
   </div>   
   </div>